home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Belgian Amiga Club - ADF Collection
/
BS1 part 27.zip
/
BS1 part 27
/
OpusBDS1.adf
/
RexxScripts
/
Only.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1993-01-12
|
2KB
|
50 lines
/* Directory Opus REXX Script */
/* Select files using a pattern */
options results /* request result string from */
/* external host */
address 'DOPUS.1' /* set current host address */
/* to directory opus */
toptext "Select Files by Pattern"
result = ''
pattern = ''
getstring 'Enter pattern...' /* request selection pattern */
/* see page 2-5 and 2-6 for */
/* pattern matching rules */
Pattern = Result
If Pattern > '' then
call selectpattern
Else
toptext "Selection Aborted"
Exit
selectpattern:
Pattern = '~(' || result || ')' /* reverse selection logic */
status 3 /* determine current window */
window = result
rescan window /* rebuild window file list */
none /* deselect all files */
address 'DOPUS.1' select pattern /* select files */
status 9 window /* count selected files */
number_hide = result
if number_hide > 0 then
do i = 1 to number_hide
getnextselected /* get first file name */
filename = result
filename = '"' || filename || '"'
address 'DOPUS.1' removefile filename 1
/* remove file from display */
End
status 6 window /* count number of entries */
number_found = result
toptext 'Found' number_found 'file(s)'
return